package com.wuyou.programmingIdeas.Chapter9interface.part1;

import com.wuyou.programmingIdeas.Chapter9interface.part1.p3.Downcase;
import com.wuyou.programmingIdeas.Chapter9interface.part1.p3.Splitter;
import com.wuyou.programmingIdeas.Chapter9interface.part1.p3.Upcase;

/**
 * @Description
 * @Author 无忧
 * @Date 2023/12/19 21:13
 */
public class Apply {

    public static void process(Processor p, Object s){
        System.out.println("Using Processor " + p.name());
        System.out.println(p.process(s));
    }

    public static String s = "Disagreement with beliefs is by definition incorrect";

    public static void main(String[] args) {
        process(new Upcase(), s);
        process(new Downcase(), s);
        process(new Splitter(), s);


//        process(new Upcase(), new HighPass(23.3));

    }
}
